﻿#include "ElementGraphicsCanvas.h"
/*
    void changed(const QList<QRectF> &region);
    void sceneRectChanged(const QRectF &rect);
    void selectionChanged();
    void focusItemChanged(QGraphicsItem *newFocus, QGraphicsItem *oldFocus, Qt::FocusReason reason);
*/
ElementGraphicsCanvas::ElementGraphicsCanvas(QObject *parent)
    : QGraphicsScene{parent}
{
    initConnect();
}

ElementGraphicsCanvas::ElementGraphicsCanvas(const QRectF &sceneRect, QObject *parent)
    : QGraphicsScene{sceneRect,parent}
{
    initConnect();
}

ElementGraphicsCanvas::ElementGraphicsCanvas(qreal x, qreal y, qreal width, qreal height, QObject *parent)
    : QGraphicsScene(x, y, width, height, parent)
{
    initConnect();
}

void ElementGraphicsCanvas::initConnect()
{
    connect(this,&ElementGraphicsCanvas::changed,this,[this](){
        this->mbModified=true;
    });
}
